import random
while True:
    player = input("请输入：\剪刀（0）\石头（1）\布（2）")
    player = int(player)
    computer = random.randint(0,2)
    if ((player == 0 and computer == 2) or (player == 1 and computer == 0) or (player  == 2 and computer == 1)):
        print("电脑出的是%s，你出的是 %s" %(computer,player))
        print("你赢了！")
    elif (player == computer):
        print("电脑出的是%s，你出的是 %s" %(computer,player))
        print("打平手了！")
    else:
        print("电脑出的是%s，你出的是 %s" %(computer,player))
        print("你输了吧！")


